package com.tbm.base.service;

import com.tbm.entity.SystemUser;
import com.tbm.entity.UserEntity;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created by Administrator on 2017/8/29.
 */
public interface SystemUserService {

    //通过登录名称获取对象
    SystemUser findByUserName(String userName);

    //获取所有用户
    List<SystemUser> findAll();

    //获取所有用户以及所对应的角色
    List<UserEntity> findAllSystemUserAndRole();

    //分页
    Page<SystemUser> findAll(Pageable pageable);

    int count();

    //删除用户
     void delete(Integer id);

    //更新用户
    void saveAndFlush(SystemUser systemUser);


    void save(SystemUser systemUser);

    SystemUser findOne(Integer userId);


    Page<SystemUser> findAll(Example<SystemUser> var1, Pageable var2);

}
